package cs575.wido.action;

import cs575.client.GroupEx;
import cs575.client.Session;
import cs575.client.WiDo;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import cs575.wido.UserSession;
import cs575.wido.WebServiceFactory;
import cs575.wido.ui.TaskDetailsWindow;
import cs575.wido.ui.TaskWindow;

public class NewTaskAction extends AbstractAction {
        TaskWindow parent;
	public NewTaskAction(TaskWindow parent) {
		putValue(NAME, "New Task");
                this.parent = parent;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO get rid of the null
		TaskDetailsWindow tdw = new TaskDetailsWindow(null);
		tdw.setAction(new AddTaskAction(tdw, parent));
		tdw.setVisible(true);
	}
}
